﻿<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="CompanyEdit.aspx.cs"
    Inherits="WebAppAuthAdmin.App.CompanyEdit" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">

</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Detalle de Marca
    </h2>
    <div class="editionContainerFilter">
        <p>
            <span class="title">C&oacute;digo de Empresa:</span>
            <asp:TextBox ID="txtCodigoEmpresa" runat="server" Text="" CssClass="input"></asp:TextBox>
        </p>
        <div class="clear">
        </div>
        <p>
            <span class="title">Nombre:</span>
            <asp:TextBox ID="txtNombreEmpresa" runat="server" Text="" CssClass="input inputlong"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidatorForNombre" ControlToValidate="txtNombreEmpresa"
                runat="server" ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator>
        </p>
        <div class="clear">
        </div>
        <p>
            <span class="title">Dominio:</span>
            <asp:TextBox ID="txtDominio" runat="server" Text="" CssClass="input inputverylong"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtDominio"
                runat="server" ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator>
        </p>
        <div class="clear">
        </div>
        <p>
            <span class="title">Path de Active Directory:</span>
            <asp:TextBox ID="txtPathAd" runat="server" Text="" CssClass="input inputverylong"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="txtPathAd"
                runat="server" ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator>
        </p>
        <div class="clear">
        </div>
        <p>
            <span class="title">Usuario AD:</span>
            <asp:TextBox ID="txtUsuarioAd" runat="server" Text="" CssClass="input inputlong"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" ControlToValidate="txtUsuarioAd"
                runat="server" ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator>
        </p>
        <div class="clear">
        </div>
        <p>
            <span class="title">Password AD:</span>
            <asp:TextBox ID="txtPasswordAd" runat="server" Text="" TextMode="Password" CssClass="input inputlong"></asp:TextBox>          
        </p>
        <div class="clear">
        </div>
    </div>
    <br />
    <h2>
        <asp:Image Width="15px" Height="15px" ID="Image1" CssClass="imgExpand" ImageUrl="/Images/icon_blockexpanded.png"
            runat="server" ClientIDMode="Static" alt="" onclick="window.AppCommonObj.toggleVisibility(this.id, 'pnlAplicacionesHabilitadas');" />
        Aplicaciones de la Marca
    </h2>
    <div class="editionContainerFilter" id="pnlAplicacionesHabilitadas">    
       <asp:HiddenField ID="hidCheckedRows" runat="server" ClientIDMode="Static" />
        <asp:GridView ID="Grid" runat="server" CellPadding="4" ForeColor="#333333"
            OnRowDataBound="Grid_RowDataBound" OnRowCommand="Grid_RowCommand" GridLines="None" AutoGenerateColumns="False"
            DataKeyNames="Id" Width="100%">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:TemplateField HeaderText="Incluir">
                    <HeaderStyle HorizontalAlign="Center" Width="30px" />
                    <ItemStyle HorizontalAlign="Center" />
                    <HeaderTemplate>
                        <asp:CheckBox ID="chkSelect" runat="server" CssClass="chkSelectRowHeader" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="chkSelectRow" runat="server" CssClass="chkSelectRow" onclick="javascript:window.AppCommonObj.HandleCheckRow(this);" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Id">
                    <HeaderStyle CssClass="displayNone" />
                    <ItemStyle CssClass="displayNone" />
                    <HeaderTemplate>
                        <span class="displayNone"></span>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <input id="hidenInputRowId_<%# Eval("Id")%>" value="<%# Eval("Id")%>" class="gridid" />
                    </ItemTemplate>
                </asp:TemplateField>              
                <asp:BoundField DataField="Name" HeaderText="Operación">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>                 
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#4b6c9e" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    </div>
    <br />
    <asp:LinkButton ID="lnkGuardar" runat="server" CssClass="guardar" OnClick="lnkGuardar_Click">Guardar</asp:LinkButton>

     <script type='text/javascript'>

         $(document).ready(function () {

             if (!window.AppCommonObj) {
                 window.AppCommonObj = new AppCommon();
             }

             $('.chkSelectRowHeader').change(function () {
                 window.AppCommonObj.ToggleSelectAllRows();
             });
         });
    </script>
</asp:Content>
